package com.qd.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 发送表
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("sys_msg_receive")
public class MsgReceive extends Model<MsgReceive> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "receive_id", type = IdType.ASSIGN_ID)
    private String receiveId;
    /**
     * 消息ID
     */
    @TableField("msg_id")
    private String msgId;
    /**
     * 业务ID
     */
    @TableField("msg_sub_id")
    private String msgSubId;
    /**
     * 手机号码
     */
    @TableField("mobile")
    private String mobile;
    /**
     * 消息类型
     */
    @TableField("msg_type")
    private String msgType;
    /**
     * 消息事件
     */
    @TableField("msg_event")
    private String msgEvent;
    /**
     * 用户类型
     */
    @TableField("from_user_type")
    private Integer fromUserType;
    /**
     * 发送人
     */
    @TableField("from_user")
    private String fromUser;
    /**
     * 接收人
     */
    @TableField("to_user")
    private String toUser;
    /**
     * 发送状态
     */
    @TableField("status")
    private Integer status;
    /**
     * 微信用户标识
     */
    @TableField("openid")
    private String openid;
    /**
     * 发送时间
     */
    @TableField("send_time")
    private LocalDateTime sendTime;
    /**
     * 写入时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;

    public void freeData() {
        this.receiveId = null;
        this.msgId = null;
        this.msgSubId = null;
        this.mobile = null;
        this.msgType = null;
        this.msgEvent = null;
        this.fromUserType = null;
        this.fromUser = null;
        this.toUser = null;
        this.status = null;
        this.openid = null;
        this.sendTime = null;
        this.addTime = null;
    }

}
